package com.syx.order.Controller;

import com.syx.order.Api.ProductApi;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/feign")
public class FeignController {

    @Resource
    ProductApi productApi;

    @RequestMapping("/f1")
    public String f1(Integer id, String userName, HttpServletResponse httpServletResponse){
        httpServletResponse.setStatus(502);
        log.info("接收到参数userName"+userName);

        return productApi.p1(id);

    }
}
